#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int main(int argc, char* argv[])
{
	int myArr[8][8];
	int (*pArr)[8] = myArr;
	memset(&myArr, 0, 64);
	int val = 0;
	for(int row=0; row<8; row++)
	{
		for(int col=0; col<8; col++)
		{
			myArr[row][col] = val++;
		}
	}

	printf("myArr[0][0]: %d, %p\n",myArr[0][0], &myArr[0][0]);
	printf("myArr[7][7]: %d, %p\n",myArr[7][7], &myArr[7][7]);

	printf("&myArr: %p\n", &myArr);
	printf("&myArr[0]: %p\n", &myArr[0]);
	printf("&myArr[0]+1: %p\n", &myArr[0]+1);

	printf("pArr: %p\n", pArr);
	printf("pArr+0: %p\n", pArr+0);
	printf("*(pArr+0): %p\n", *(pArr+0));
	printf("==============================================\n");
	int a[20];
	int *p;
	p = a;
	a[2] = 10;
	printf("a[2]: %p, %d\n", &a[2], a[2]);
	printf("p+2: %p, %d\n", (p+2), *(p+2));
	return 0;
}
